export function cleanUndefined<T extends Record<string, any>>(
  data: T,
): { [p: string]: any } {
  return Object.fromEntries(
    Object.entries(data).filter(([, value]) => value !== undefined),
  );
}
